<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class AddVideopermitToProfile extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('user_profile', function (Blueprint $table) {
            $table->tinyInteger('video_permit')->default(1)->comment('是否允许接听视频：1-允许，0-关闭')->after('call_permit');
            $table->double('video_coin_setting', 5, 1)->default(0.0)->comment('设置视频金币收费')->after('coin_setting');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('user_profile', function (Blueprint $table) {
            //
        });
    }
}
